const path = require('path')
const resolve = dir => {
  return path.join(__dirname, dir)
}
var webpack = require('webpack')
module.exports = {
  lintOnSave: true,
  assetsDir: "static",
  publicPath: '/portal/apps/com.awspaas.user.apps.forehope.portal/forehopePortal',
  chainWebpack: config => {
    config.resolve.alias
      .set('_c', resolve('src/components')) // key,value自行定义，比如.set('@@', resolve('src/components'))
  },
  // devServer: {
  //   port: 3000,
  //   open: true, //配置自动启动浏览器
  // },
  devServer: {
    port: 3000,
    open: true,

    proxy: {

      '/portal/': {
        target: 'http://47.94.11.113:9999',
        // target: 'https://bpm.forehope-elec.com',
        // target: 'https://cloud.feymer.com/bpmdevportal',
        secure: false,
        changeOrigin: true

      },
    }
  },
  configureWebpack: {
    devtool: 'source-map',
    plugins: [
        new webpack.ProvidePlugin({
            $: "jquery",
            jQuery: "jquery",
            "windows.jQuery": "jquery"
        })
    ]
}
}

